<?php
/**
 * Extension de Zend_Log
 *
 * @package zfbook
 * @subpackage log
 */
class Zfbook_Log extends Zend_Log
{
    const DEBUG_BACKTRACE = 8;
    
    /**
     * Enregistre dans le log la trace d'appel PHP
     *
     * @param string $message
     * @return void
     */
    public function debug_backtrace($message = null)
    {
        list($backtrace) = debug_backtrace();
        unset($backtrace['object']);
        $backtrace = print_r($backtrace, true);
        $toLog = $message . $backtrace;
        return $this->log($toLog, self::DEBUG_BACKTRACE);
    }
}
